let vm=new Vue({
    el:'#main',
    data:{
        service:{}
    },
    methods:{
        doUpdate:function () {
            axios({
                url:'service/doUpdate',
                method:'put',
                data: this.service
            }).then(rs=>{
                if (rs.data.success) {
                    parent.layer.message+=1;
                }else if (!rs.data.success) {
                    parent.layer.message-=1;
                }
                this.closeLayer()
            })
        },
        closeLayer:function () {
            let index = parent.layer.getFrameIndex(window.name); //获取窗口索引
            parent.layer.close(index);//通过父窗口layer对象关闭子窗口
        }
    },
    created:function () {
        this.service=parent.layer.service
    }
})